function [a0,gamma0] = a0_fun(b0,Y,X)

n     = size(Y,1);

k     = size(X,2);

gamma0 = trace(X'*X/n)/k;

aux   = (.5*Y'*( (eye(n) + X*X'/(gamma0*k) )^(-1))*Y );

a0    = (.5*n)*b0*(1/aux);

end

